#!/bin/bash


function site_selenium() {
	echo "Enabling simpletest and selenium for $SITENAME"
	cd $UNPACKED
	drush -y pm-enable simpletest selenium
}


if [ $# -eq 2 ]
then
	SITENAME=$1
	PLATFORM=$2
	
	if [ ! -d /var/www/$PLATFORM ]
	then
		echo "Platform $PLATFORM not found"
		exit 1
	fi
	
	UNPACKED=/var/www/$PLATFORM/sites/$SITENAME
	
	site_selenium
else
	echo "Usage: site_prepare.sh <fqdn_site> <export_file_location.tgz> <platform_name>"
	exit -1
fi
